<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>demo</title>
    <link rel="stylesheet" href="css/upImg.css">
    <link rel="stylesheet" href="css/layer.css">
</head>
<body style="padding:15px">
    <a href="#" class="upFiles" >
        选择图片
        <input class="fileInput " type="file"  multiple onchange="fileChange(this)" />
    </a>
    <div class="fileCont" contenteditable="true"> </div>
    <div>
        <h4>说明:</h4>
        <p>1.给外面包着的a标签或者其他元素 添加类名.upFiles.</p>
        <p>2.预览的div添加类名.fileInput.</p>
        <p>3.给input绑定onchange事件,函数名为 fileChange().</p>
        <p>3.未做兼容(IE8不兼容)</p>
        <p>4.弹框用了layer插件.</p>
        <p>5.详情参考demo.</p>
    </div>
<script src="js/jquery.min.js"></script>
<script src="js/layer.js"></script>
<script src="js/upImg.js"></script>
</body>
</html>